﻿var resizeTimerID = null;
function onResize() {
    if (resizeTimerID == null) {
        resizeTimerID = window.setTimeout(function() {
            resizeTimerID = null;
            tl.layout();
        }, 500);
    }
}

function init(method) {    
    window.setTimeout(method,1000);
    if (document.body.addEventListener) {
	    document.body.addEventListener('onresize', onResize, false);
    }  else if (document.body.attachEvent) {
	    document.body.attachEvent('onresize', onResize);
    }
}
